{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "ename": "FileNotFoundError",
     "evalue": "[Errno 2] No such file or directory: '/home/xusc/exp/mtpsl/results/nyuv2_with_controlnet_2024-02-27_10-50-34#4#1.0e-04#R#TwoMappingTask#moreEpoch#DifferentPrompt#mini/onelabel/mtl/2024-02-27_10-50-54.txt'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mFileNotFoundError\u001b[0m                         Traceback (most recent call last)",
      "\u001b[0;32m/tmp/ipykernel_38258/2945966865.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m    252\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    253\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 254\u001b[0;31m \u001b[0mloss_ploter\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mLossPloter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mplot_path\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    255\u001b[0m \u001b[0;31m# epochs = loss_ploter.plot_test_acc()\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    256\u001b[0m \u001b[0;31m# for e in epochs:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/tmp/ipykernel_38258/2945966865.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, path, last)\u001b[0m\n\u001b[1;32m     10\u001b[0m \u001b[0;32mclass\u001b[0m \u001b[0mLossPloter\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     11\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m__init__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlast\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 12\u001b[0;31m         \u001b[0;32mwith\u001b[0m \u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mplot_path\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'r'\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mfile\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     13\u001b[0m             \u001b[0mlines\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfile\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreadlines\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     14\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/home/xusc/exp/mtpsl/results/nyuv2_with_controlnet_2024-02-27_10-50-34#4#1.0e-04#R#TwoMappingTask#moreEpoch#DifferentPrompt#mini/onelabel/mtl/2024-02-27_10-50-54.txt'"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "\n",
    "import os \n",
    "# os.chdir('/data/xusc/exp/MTPSL')\n",
    "os.chdir('/home/xusc/exp/mtpsl')\n",
    "\n",
    "import re\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "import numpy as np\n",
    "from scipy.signal import savgol_filter\n",
    "class LossPloter:\n",
    "    def __init__(self,path, last = None):\n",
    "        with open(plot_path, 'r') as file:\n",
    "            lines = file.readlines()\n",
    "\n",
    "        \n",
    "        timestamps = []\n",
    "        loss_simple = []\n",
    "        loss_vlb = []\n",
    "        loss = []\n",
    "        steps = []\n",
    "        train_mean_iou = []\n",
    "        train_abs_err = []\n",
    "        train_mean = []\n",
    "        test_a_mean_iou = []\n",
    "        test_a_abs_err = []\n",
    "        test_a_mean = []\n",
    "        \n",
    "        if last is not None :\n",
    "            lines = lines[-last:]\n",
    "            \n",
    "        for line in lines:\n",
    "            # 使用正则表达式匹配字段数据\n",
    "            # match = re.search(r'train/loss_simple:\\s+([\\d.]+)\\s+train/loss_vlb:\\s+([\\d.]+)\\s+train/loss:\\s+([\\d.]+)', line)\n",
    "            \n",
    "            # match = re.search(r'train/loss_simple:\\s+([\\d.]+)\\s+train/loss_vlb:\\s+([\\d.]+)\\s+train/loss:\\s+([\\d.]+)\\s+step_index:\\s+(\\d+)', line)\n",
    "            # if match:\n",
    "            #     loss_simple.append(float(match.group(1)))\n",
    "            #     loss_vlb.append(float(match.group(2)))\n",
    "            #     loss.append(float(match.group(3)))\n",
    "            #     steps.append(int(match.group(4)))\n",
    "            match = re.search(r'loss:\\s+([\\d.]+)\\s+step_index:\\s+(\\d+)', line)\n",
    "            if match:\n",
    "                loss.append(float(match.group(1)))\n",
    "                steps.append(int(match.group(2)))\n",
    "\n",
    "\n",
    "            match = re.search(r\"TRAIN:\\s+([\\d.]+)\\s([\\d.]+)\\s([\\d.]+)\\s\\|\\s([\\d.]+)\\s([\\d.]+)\\s([\\d.]+)\\s\\|\\s([\\d.]+)\\s([\\d.]+)\\s([\\d.]+)\\s([\\d.]+)\\s([\\d.]+)\\s([\\d.]+)\\sTEST:\\s([\\d.]+)\\s([\\d.]+)\\s([\\d.]+)\\s\\|\\s([\\d.]+)\\s([\\d.]+)\\s([\\d.]+)\\s\\|\\s([\\d.]+)\\s([\\d.]+)\\s([\\d.]+)\\s([\\d.]+)\\s([\\d.]+)\\s([\\d.]+)\", line)\n",
    "\n",
    "            if match:\n",
    "                semantic_loss = float(match.group(1))\n",
    "                mean_iou = float(match.group(2))\n",
    "                pix_acc = float(match.group(3))\n",
    "     \n",
    "                \n",
    "                depth_loss = float(match.group(4))\n",
    "                abs_err = float(match.group(5))\n",
    "                root_mse = float(match.group(6))\n",
    "                \n",
    "                \n",
    "                normal_loss = float(match.group(7))\n",
    "                mean = float(match.group(8))\n",
    "                med = float(match.group(9))\n",
    "                less_11_25 = float(match.group(10))\n",
    "                less_22_5 = float(match.group(11))\n",
    "                less_30 = float(match.group(12))\n",
    "                train_mean_iou.append(mean_iou)\n",
    "                train_abs_err.append(abs_err)\n",
    "                train_mean.append(mean)\n",
    "                \n",
    "                test_semantic_loss = float(match.group(13))\n",
    "                test_mean_iou = float(match.group(14))\n",
    "                test_pix_acc = float(match.group(15))\n",
    "                \n",
    "                test_depth_loss = float(match.group(16))\n",
    "                test_abs_err = float(match.group(17))\n",
    "                test_root_mse = float(match.group(18))\n",
    "                \n",
    "                test_normal_loss = float(match.group(19))\n",
    "                test_mean = float(match.group(20))\n",
    "                test_med = float(match.group(21))\n",
    "                test_less_11_25 = float(match.group(22))\n",
    "                test_less_22_5 = float(match.group(23))\n",
    "                test_less_30 = float(match.group(24))\n",
    "                \n",
    "                test_a_mean_iou.append(test_mean_iou)\n",
    "                test_a_abs_err.append(test_abs_err)\n",
    "                test_a_mean.append(test_mean)\n",
    "\n",
    "                # print(\"Semantic Loss:\", semantic_loss)\n",
    "                # print(\"Mean IOU:\", mean_iou)\n",
    "                # print(\"Pixel Accuracy:\", pix_acc)\n",
    "                # print(\"Depth Loss:\", depth_loss)\n",
    "                # print(\"Absolute Error:\", abs_err)\n",
    "                # print(\"Root Mean Square Error:\", root_mse)\n",
    "                # print(\"Normal Loss:\", normal_loss)\n",
    "                # print(\"Mean:\", mean)\n",
    "                # print(\"Median:\", med)\n",
    "                # print(\"Less than 11.25:\", less_11_25)\n",
    "                # print(\"Less than 22.5:\", less_22_5)\n",
    "                # print(\"Less than 30:\", less_30)\n",
    "                # print(\"Test Semantic Loss:\", test_semantic_loss)\n",
    "                # print(\"Test Mean IOU:\", test_mean_iou)\n",
    "                # print(\"Test Pixel Accuracy:\", test_pix_acc)\n",
    "                # print(\"Test Depth Loss:\", test_depth_loss)\n",
    "                # print(\"Test Absolute Error:\", test_abs_err)\n",
    "                # print(\"Test Root Mean Square Error:\", test_root_mse)\n",
    "                # print(\"Test Normal Loss:\", test_normal_loss)\n",
    "                # print(\"Test Mean:\", test_mean)\n",
    "                # print(\"Test Median:\", test_med)\n",
    "                # print(\"Test Less than 11.25:\", test_less_11_25)\n",
    "                # print(\"Test Less than 22.5:\", test_less_22_5)\n",
    "                # print(\"Test Less than 30:\", test_less_30)\n",
    "\n",
    "\n",
    "            # 提取时间戳\n",
    "            timestamp_match = re.search(r'(\\d{4}-\\d{2}-\\d{2}\\s+\\d{2}:\\d{2}:\\d{2}.\\d+)', line)\n",
    "            if timestamp_match:\n",
    "                timestamps.append(timestamp_match.group(1))\n",
    "        self.timestamps = timestamps\n",
    "        self.loss_simple = loss_simple\n",
    "        self.loss_vlb = loss_vlb\n",
    "        self.loss = loss\n",
    "        self.steps = steps\n",
    "        self.train_mean_iou=train_mean_iou\n",
    "        self.train_abs_err = train_abs_err\n",
    "        self.train_mean = train_mean\n",
    "        self.test_a_mean_iou = test_a_mean_iou\n",
    "        self.test_a_abs_err = test_a_abs_err\n",
    "        self.test_a_mean = test_a_mean\n",
    "        \n",
    "        print('max epoch: %d'%(len(self.test_a_mean)))\n",
    "        \n",
    "    def plot_seperate(self):\n",
    "\n",
    "        plt.plot(range(len(self.loss_simple)), self.loss_simple, label= 'origin')\n",
    "        \n",
    "        # 使用 Savitzky-Golay 滤波器进行平滑\n",
    "        smoothed_y = savgol_filter(self.loss_simple, window_length=5, polyorder=3)\n",
    "        plt.plot(range(len(self.loss_simple)), smoothed_y,label='smoothed')\n",
    "        \n",
    "        plt.xlabel('Data Point')\n",
    "        plt.ylabel('loss_simple')\n",
    "        plt.title('Loss Simple')\n",
    "        plt.legend()\n",
    "        plt.show()\n",
    "\n",
    "        plt.plot(range(len(self.loss_vlb)), self.loss_vlb, label= 'origin')\n",
    "        smoothed_y = savgol_filter(self.loss_vlb, window_length=5, polyorder=3)\n",
    "        plt.plot(range(len(self.loss_vlb)), smoothed_y, label='smoothed')\n",
    "        plt.xlabel('Data Point')\n",
    "        plt.ylabel('loss_vlb')\n",
    "        plt.title('Loss VLB')\n",
    "        plt.legend()\n",
    "        plt.show()\n",
    "\n",
    "\n",
    "        plt.plot(range(len(self.loss)), self.loss, label= 'origin')\n",
    "        smoothed_y = savgol_filter(self.loss, window_length=5, polyorder=3)\n",
    "        plt.plot(range(len(self.loss)), smoothed_y, label='smoothed')\n",
    "        plt.xlabel('Data Point')\n",
    "        plt.ylabel('loss')\n",
    "        plt.legend()\n",
    "        plt.title('Loss')\n",
    "        plt.show()\n",
    "\n",
    "        plt.plot(range(len(self.steps)), self.steps)\n",
    "        plt.xlabel('Data Point')\n",
    "        plt.ylabel('step')\n",
    "        plt.title('Step')\n",
    "        plt.show()\n",
    "    def plot(self):\n",
    "        # plt.plot(range(len(self.loss_simple)), self.loss_simple,label='loss')\n",
    "        # plt.plot(range(len(self.loss_vlb)), self.loss_vlb,label = 'loss_vlb')\n",
    "        plt.plot(range(len(self.loss)), self.loss,label='loss simple')\n",
    "\n",
    "        plt.xlabel('Data Point')\n",
    "        plt.ylabel('loss')\n",
    "        plt.title('Loss')\n",
    "        plt.legend()\n",
    "        plt.show()\n",
    "    def plot_train_acc(self):\n",
    "        \n",
    "        plt.plot(range(len(self.train_mean_iou)), self.train_mean_iou)\n",
    "        plt.xlabel('epoch')\n",
    "        plt.ylabel('mean_iou')\n",
    "        plt.title('mean_iou')\n",
    "        plt.show()\n",
    "\n",
    "        plt.plot(range(len(self.train_abs_err)), self.train_abs_err)\n",
    "        plt.xlabel('epoch')\n",
    "        plt.ylabel('abs Error')\n",
    "        plt.title('abs Error')\n",
    "        plt.show()\n",
    "\n",
    "\n",
    "        plt.plot(range(len(self.train_mean )), self.train_mean )\n",
    "        plt.xlabel('epoch')\n",
    "        plt.ylabel('mean Error')\n",
    "        plt.title('mean Error')\n",
    "        plt.show()\n",
    "        \n",
    "    def plot_test_acc(self):\n",
    "        max_iou_epoch = np.argmax(self.test_a_mean_iou) +1\n",
    "        min_abs_err_epoch = np.argmin(self.test_a_abs_err) + 1\n",
    "        min_mean_err_epoch =np.argmin(self.test_a_mean) +1\n",
    "        print('max mean iou : %f \\t epoch: %d'%(max(self.test_a_mean_iou), max_iou_epoch ))\n",
    "        print('min abs Error : %f \\t epoch: %d'%(min(self.test_a_abs_err),min_abs_err_epoch))\n",
    "        print('min mean Error : %f \\t epoch: %d'%(min(self.test_a_mean), min_mean_err_epoch ))\n",
    "        plt.plot(range(len(self.test_a_mean_iou)), self.test_a_mean_iou)\n",
    "        plt.xlabel('epoch')\n",
    "        plt.ylabel('mean_iou')\n",
    "        plt.title('mean_iou')\n",
    "        plt.show()\n",
    "        \n",
    "        \n",
    "        \n",
    "        plt.plot(range(len(self.test_a_abs_err)), self.test_a_abs_err)\n",
    "        plt.xlabel('epoch')\n",
    "        plt.ylabel('abs Error')\n",
    "        plt.title('abs Error')\n",
    "        plt.show()\n",
    "        \n",
    "        plt.plot(range(len(self.test_a_mean )), self.test_a_mean )\n",
    "        plt.xlabel('epoch')\n",
    "        plt.ylabel('mean Error')\n",
    "        plt.title('mean Error')\n",
    "        plt.show()\n",
    "        return max_iou_epoch,min_abs_err_epoch,min_mean_err_epoch\n",
    "    def get_one_test_acc(self,epoch):\n",
    "        # if self.test_a_mean_iou[epoch - 1] > 0.3174 and self.test_a_abs_err[epoch -1 ] <= 0.5865 and self.test_a_mean[epoch -1] <= 30.75:\n",
    "        # if self.test_a_mean_iou[epoch - 1] > 0.3174  and self.test_a_mean[epoch -1] <= 30.75:\n",
    "        # if self.test_a_mean_iou[epoch - 1] > 0.3174 and self.test_a_abs_err[epoch -1 ] <= 0.5865 :\n",
    "        # if  self.test_a_abs_err[epoch -1 ] <= 0.5865 and self.test_a_mean[epoch -1] <= 30.75:\n",
    "        # if   self.test_a_mean_iou[epoch - 1] > 0.3174:\n",
    "        #     print('epoch : %d \\t mean iou : %f \\t abs Error : %f \\t mean Error %f '%(epoch, self.test_a_mean_iou[epoch - 1], self.test_a_abs_err[epoch -1 ], self.test_a_mean[epoch -1]))\n",
    "        print('epoch : %d \\t mean iou : %f \\t abs Error : %f \\t mean Error %f '%(epoch, self.test_a_mean_iou[epoch - 1], self.test_a_abs_err[epoch -1 ], self.test_a_mean[epoch -1]))\n",
    "        \n",
    "        \n",
    "    \n",
    "\n",
    "# plot_path= \"/data/xusc/exp/MTPSL/results/nyuv2_with_controlnet_2024-02-18_16-56-15#2#1.0e-04#R#fixDiffusionTrainControlNet/onelabel/mtl/2024-02-18_16-56-29.txt\"\n",
    "# plot_path= \"/data/xusc/exp/MTPSL/results/nyuv2_with_controlnet_2024-02-18_16-57-56#2#1.0e-05#R#fixDiffusionTrainControlNet/onelabel/mtl/2024-02-18_16-58-10.txt\"\n",
    "# plot_path= \"/data/xusc/exp/MTPSL/results/nyuv2_with_controlnet_2024-02-18_17-00-29#2#1.0e-06#R#fixDiffusionTrainControlNet/onelabel/mtl/2024-02-18_17-00-47.txt\"\n",
    "\n",
    "# plot_path= \"results/nyuv2_with_controlnet_2024-02-18_22-15-36#2#1.0e-05#R#CheckReconstructCode/onelabel/mtl/2024-02-18_22-15-49.txt\"\n",
    "# plot_path= \"/data/xusc/exp/MTPSL/results/nyuv2_with_controlnet_2024-02-18_22-51-12#2#1.0e-04#R#FreezeSegNetTrainTrainControlNet/onelabel/mtl/2024-02-18_22-51-26.txt\"\n",
    "plot_path= \"/home/xusc/exp/mtpsl/results/nyuv2_with_controlnet_2024-02-27_10-50-34#4#1.0e-04#R#TwoMappingTask#moreEpoch#DifferentPrompt#mini/onelabel/mtl/2024-02-27_10-50-54.txt\"\n",
    "# plot_path= \"/data/xusc/exp/MTPSL/results/nyuv2_with_controlnet_2024-02-22_09-49-53#16#1.0e-04#R#GT4Both#OneMappingTask#miniSet/onelabel/mtl/2024-02-22_09-50-14.txt\"\n",
    "\n",
    "\n",
    "# plot_path= \"results/nyuv2_with_controlnet_2024-02-18_16-53-28#2#1.0e-04#R#fixDiffusionTrainControlNet#JoinCrossDomainLoss/onelabel/mtl/2024-02-18_16-53-41.txt\"\n",
    "\n",
    "\n",
    "loss_ploter = LossPloter(plot_path)\n",
    "# epochs = loss_ploter.plot_test_acc()\n",
    "# for e in epochs:\n",
    "#     loss_ploter.get_one_test_acc(e)\n",
    "loss_ploter.plot()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch : 118 \t mean iou : 0.317500 \t abs Error : 0.591500 \t mean Error 30.892900 \n",
      "epoch : 129 \t mean iou : 0.320700 \t abs Error : 0.610200 \t mean Error 30.777200 \n",
      "epoch : 135 \t mean iou : 0.319100 \t abs Error : 0.648000 \t mean Error 31.265000 \n",
      "epoch : 137 \t mean iou : 0.318500 \t abs Error : 0.612400 \t mean Error 30.685700 \n",
      "epoch : 152 \t mean iou : 0.318800 \t abs Error : 0.584100 \t mean Error 30.609800 \n",
      "epoch : 164 \t mean iou : 0.317700 \t abs Error : 0.650800 \t mean Error 30.829400 \n",
      "epoch : 196 \t mean iou : 0.318700 \t abs Error : 0.606600 \t mean Error 30.752600 \n"
     ]
    }
   ],
   "source": [
    "for e in range(100,200):\n",
    "    loss_ploter.get_one_test_acc(e)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.305250 0.602870 31.790516\n",
      "0.309188 0.599738 31.685621\n",
      "0.310173 0.601445 31.649370\n",
      "0.312766 0.599242 31.612223\n",
      "0.312093 0.592914 31.683447\n",
      "0.310719 0.600784 31.596928\n",
      "0.310481 0.595870 31.674065\n",
      "0.309539 0.597372 31.605652\n",
      "0.308215 0.596943 31.615696\n",
      "0.309358 0.595221 31.611652\n",
      "0.311560 0.601207 31.544079\n",
      "0.308887 0.600342 31.615503\n",
      "0.308140 0.598034 31.481394\n",
      "0.308642 0.601184 31.448277\n",
      "0.310206 0.600504 31.488585\n",
      "0.305104 0.596123 31.420126\n",
      "0.307468 0.597733 31.531265\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "class ResultsExtractor:\n",
    "\n",
    "    def __init__(self, src):\n",
    "        data  = np.loadtxt(src,dtype=np.str0, delimiter='\\t').tolist()\n",
    "\n",
    "        keys = data[0]\n",
    "\n",
    "        all_data = [] \n",
    "        for idx, row in enumerate(data[1:]):\n",
    "            row_data = {}\n",
    "            for idxx, key in  enumerate(keys):\n",
    "                key = key.strip()\n",
    "                if len(key) != 0:\n",
    "                    row_data[key] = row[idxx]\n",
    "            all_data.append(row_data)\n",
    "\n",
    "        self.data  = all_data\n",
    "\n",
    "    def __call__(self,):\n",
    "\n",
    "        for d in self.data:\n",
    "            print(d['V. mIoU'], d['V.abs'], d['V.Mean'])\n",
    "\n",
    "\n",
    "# src= '/home/xusc/exp/mtpsl/results/nyuv2_with_controlnet_2024-03-12_18-19-01#8#1.0e-04#R#allTask#stage2#lr1e4/onelabel/mtl/mtl_xtc_onelabel_fixed_2.0_0.5_log.txt'\n",
    "src= '/home/xusc/exp/mtpsl/results/nyuv2_with_controlnet_2024-03-12_18-19-04#4#1.0e-05#R#allTask#stage2#lr1e5/onelabel/mtl/mtl_xtc_onelabel_fixed_2.0_0.5_log.txt'\n",
    "# src= '/home/xusc/exp/mtpsl/results/nyuv2_with_controlnet_2024-03-14_23-47-15#4#1.0e-04#R#allTask#stage2#lr1e4#batch_controlnet/onelabel/mtl/mtl_xtc_onelabel_fixed_2.0_0.5_log.txt'\n",
    "\n",
    "extractor = ResultsExtractor(src)\n",
    "extractor()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "mtpsl",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
